<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //es5.0严格模式,必须是第一行代码
        "use strict"
    </script>
    <script>
        var num = 3;

        function test() {
            //在当前函数作用域使用es5.0严格模式,全局仍使用3.0(推荐使用)
            "use strict"
        }
    </script>
</body>

</html>